Skip to content

test: cover AI model deserialization patterns#60

Merged
ParzivalHack merged 2 commits into
ParzivalHack:mainfrom
ynachiket:ynachiket/test-ai-rule-coverage-20260604
Jun 5, 2026
Merged

test: cover AI model deserialization patterns#60
ParzivalHack merged 2 commits into
ParzivalHack:mainfrom
ynachiket:ynachiket/test-ai-rule-coverage-20260604

Conversation

@ynachiket
Copy link
Copy Markdown
Contributor

Summary

  • add metadata coverage for the existing AI203 and AI204 model deserialization rules
  • add focused detection tests for keras.models.load_model(...) and joblib.load(...)
  • add comment-line exclusion checks so the regex rules do not flag commented examples

Closes #16

Validation

  • /tmp/pyspector-pdlc047-venv/bin/python -m pytest tests/unit/test_ai_rules.py -q -> 4 passed, 6 skipped (scanner-path tests skipped because the local runner lacks the PySpector Rust core)
  • /tmp/pyspector-pdlc047-venv/bin/python -m py_compile tests/unit/test_ai_rules.py
  • git diff --check

@ParzivalHack ParzivalHack added the Test Label for every issue related to tests and testing in general label Jun 5, 2026
Copy link
Copy Markdown
Owner

@ParzivalHack ParzivalHack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I require no edits, merging :)

@ParzivalHack ParzivalHack merged commit 748b8ac into ParzivalHack:main Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Test Label for every issue related to tests and testing in general

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Good First Issue: Add tests for existing security rules

2 participants